/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.edu.entity;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.sys.entity.Employee;

/**
 * 人才称号Entity
 * @author 赵俊飞
 * @version 2019-03-02
 */
@Table(name="edu_talent", alias="a", columns={
		@Column(name="id", attrName="id", label="编号", isPK=true),
		@Column(name="user_id", attrName="employee.empCode", label="父表主键"),
		@Column(name="talent_code", attrName="talentCode", label="职称名称", queryType=QueryType.LIKE),
		@Column(name="talent_year", attrName="talentYear", label="获取时间"),
		@Column(name="is_sys", attrName="isSys", label="是否系统字典"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class EduTalent extends DataEntity<EduTalent> {
	
	private static final long serialVersionUID = 1L;
	private String talentCode;		// 职称名称
	private String talentYear;		// 获取时间
	private String isSys;		// 是否系统字典
	private Employee employee;


	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public EduTalent() {
		this(null);
	}

	public EduTalent(String id){
		super(id);
	}
	
	
	@NotBlank(message="职称名称不能为空")
	@Length(min=0, max=100, message="职称名称长度不能超过 100 个字符")
	public String getTalentCode() {
		return talentCode;
	}

	public void setTalentCode(String talentCode) {
		this.talentCode = talentCode;
	}
	
	@NotBlank(message="获取时间不能为空")
	@Length(min=0, max=20, message="获取时间长度不能超过 20 个字符")
	public String getTalentYear() {
		return talentYear;
	}

	public void setTalentYear(String talentYear) {
		this.talentYear = talentYear;
	}
	
	@NotBlank(message="是否系统字典不能为空")
	@Length(min=0, max=1, message="是否系统字典长度不能超过 1 个字符")
	public String getIsSys() {
		return isSys;
	}

	public void setIsSys(String isSys) {
		this.isSys = isSys;
	}
	
}